package com.hunan.api.catv.action.report;

import com.hunan.api.catv.action.BaseAction;
import com.hunan.api.catv.annotation.MemberAuth;
import com.hunan.api.catv.common.Api;
import com.hunan.api.catv.entity.Result;
import com.hunan.api.catv.entity.vo.MemberReportRecordVo;
import com.hunan.api.catv.service.biz.report.MemberReportRecordBiz;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @Author: wangchao
 * @Date: 2020/12/21 11:17
 */
@RestController
@Validated
@RequestMapping(Api.report)
public class MemberReportRecordAction extends BaseAction {
    @Autowired
    MemberReportRecordBiz memberReportRecordBiz;

    /**
     * 新增评论
     */
    @MemberAuth
    @PostMapping("/saveReportRecord")
    public Result saveReportRecord(HttpServletRequest request, @RequestBody MemberReportRecordVo memberReportRecordVo) {
        return buildOK(memberReportRecordBiz.saveReportRecord(getMemberId(request), memberReportRecordVo), "");
    }
}
